﻿@using Kunlun.BusinessLogic
@model List<Kunlun.Models.AdManage>
@{
	ViewBag.Title = "框画首页";
	Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head{
	<link  href="@Url.Content("~/Content/PictureFrame/StyleSheet.css")" type="text/css" rel="Stylesheet" />
	<script type="text/javascript">
		var _c = _h = 0;
		$(document).ready(function () {
			$('#play > li').click(function () {
				var i = $(this).attr('alt') - 1;
				clearInterval(_h);
				_c = i;
				//play();
				change(i);
			})
			$("#pic img").hover(function () { clearInterval(_h) }, function () { play() });
			play();
		})
		function play() {
			_h = setInterval("auto()", 5000);

		}
		function change(i) {
			$('#play > li').attr('class', '').eq(i).attr('class', 'sel').blur();
			$("#pic img").fadeOut('slow').eq(i).fadeIn('slow');
		}
		function auto() {
			_c = _c > 1 ? 0 : _c + 1;

			change(_c);
		}
	</script>
}
<div class="ad_div">
	<a href="@Model.Single(m => m.Orders == 1).Url" target="_blank">
		<img src="@string.Format("{0}{1}", WebLog.ImageHttp, Model.Single(m => m.Orders == 1).PicUrl.Replace('\\', '/'))" alt="@Model.Single(m => m.Orders == 1).Title" /></a>
</div>
<!-- content -->
<div class="content">
	<div class="content_left">
		<div class="class_tt">
		</div>
		<div class="class_center">
			@{Html.RenderAction("CategoryMenu", "Frame", new { id = 38 });}
		</div>
	</div>
	<!-- right -->
	<div class="content_right">
		<div class="play">
			<div id="BannerArea" class="w960">
				<div id="pic">
					<a href="@Model.Single(m => m.Orders == 1).Url" target="_blank">
						<img src="@string.Format("{0}{1}", WebLog.ImageHttp, Model.Single(m => m.Orders == 2).PicUrl.Replace('\\', '/'))" alt="@Model.Single(m => m.Orders == 2).Title" /></a>
					<a href="@Model.Single(m => m.Orders == 1).Url" target="_blank">
						<img src="@string.Format("{0}{1}", WebLog.ImageHttp, Model.Single(m => m.Orders == 3).PicUrl.Replace('\\', '/'))" alt="@Model.Single(m => m.Orders == 2).Title" /></a>
					<a href="@Model.Single(m => m.Orders == 1).Url" target="_blank">
						<img src="@string.Format("{0}{1}", WebLog.ImageHttp, Model.Single(m => m.Orders == 4).PicUrl.Replace('\\', '/'))" alt="@Model.Single(m => m.Orders == 2).Title" /></a>
					<div id="img_text">
						<ul id="play">
							<li alt="1">1 </li>
							<li alt="2">2 </li>
							<li alt="3">3 </li>
						</ul>
					</div>
					<div id="swf-top-yj">
					</div>
				</div>
			</div>
		</div>
		<dl class="news_list">
			<dt>昆仑动态</dt>
			@foreach (Kunlun.Models.News item in ViewData["News"] as List<Kunlun.Models.News>)
   {
				<dd>
					<a href="@Url.Content("~/help/newsCon/" + item.ID)" target="_blank">@item.NewsTitle</a></dd> 
   }
			<dd class="duo">
				<a href="@Url.Content("~/help/newslist")" target="_blank">更多<span>>></span></a></dd>
		</dl>
		<div class="tel">
		</div>
		<!-- PFTJTYQ -->
		<div class="main_tt_more1">
			@Html.ActionLink("MORE", "Search", new { @f = 86 }, new { @target = "_blank" })</div>
		<ul class="class_item">
			@foreach (Kunlun.Models.Product cheapModel in ViewData["cheap"] as List<Kunlun.Models.Product>)
   {
				<li><a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" class="img_link" target="_blank">
					<img onload="DrawImage(this,140,140)" src="@string.Format("{0}{1}", WebLog.ImageHttp, ProductImageToThum.Thumbnail(cheapModel.ViewPic))" alt="@cheapModel.Name" /></a>
					<a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank">@cheapModel.Name</a>
					<span>原价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Makeprice))</span> <span>现价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Kacaprice))</span></li>
   }
		</ul>
		<div class="main_tt_more2">
			@Html.ActionLink("MORE", "Search", new { @f = 87 }, new { @target = "_blank" })
		</div>
		<ul class="class_item">
			@foreach (Kunlun.Models.Product cheapModel in ViewData["first"] as List<Kunlun.Models.Product>)
   {
				<li><a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank" class="img_link">
					<img onload="DrawImage(this,140,140)" src="@string.Format("{0}{1}", WebLog.ImageHttp, ProductImageToThum.Thumbnail(cheapModel.ViewPic))" alt="@cheapModel.Name" /></a>
					<a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank">@cheapModel.Name</a>
					<span>原价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Makeprice))</span> <span>现价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Kacaprice))</span></li>
   }
		</ul>
		<div class="main_tt_more3">
			@Html.ActionLink("MORE", "Search", new { @f = 88 }, new { @target = "_blank" })</div>
		<ul class="class_item">
			@foreach (Kunlun.Models.Product cheapModel in ViewData["second"] as List<Kunlun.Models.Product>)
   {
				<li><a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank" class="img_link">
					<img onload="DrawImage(this,140,140)" src="@string.Format("{0}{1}", WebLog.ImageHttp, ProductImageToThum.Thumbnail(cheapModel.ViewPic))" alt="@cheapModel.Name" /></a>
					<a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank">@cheapModel.Name</a>
					<span>原价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Makeprice))</span> <span>现价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Kacaprice))</span></li>
   }
		</ul>
		<div class="main_tt_more4">
			@Html.ActionLink("MORE", "Search", new { @f = 89 })</div>
		<ul class="class_item">
			@foreach (Kunlun.Models.Product cheapModel in ViewData["three"] as List<Kunlun.Models.Product>)
   {
				<li><a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" class="img_link" target="_blank">
					<img onload="DrawImage(this,140,140)" src="@string.Format("{0}{1}", WebLog.ImageHttp, ProductImageToThum.Thumbnail(cheapModel.ViewPic))" alt="@cheapModel.Name" /></a>
					<a href="@Url.Action("Views", "Frame", new { id = cheapModel.pid })" target="_blank">@cheapModel.Name</a>
					<span>原价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Makeprice))</span> <span>现价：￥@Html.Encode(String.Format("{0:F}", cheapModel.Kacaprice))</span></li>
   }
		</ul>
	</div>
	<ul class="PFBottom">
	</ul>
	@Html.Partial("HelpCenter")
	<div class="links">
		@Html.Partial("friendlink")
	</div>
</div>